# https://blog.csdn.net/qq_45815991/article/details/127000551
export PYTHONIOENCODING=utf-8
if [[ ! -z $1 ]] && [[ -d $1 ]] && [[ -z ${unline_path} ]]
then
PREHOME=$1
elif [[ ! -z ${unline_path} ]]
then
PREHOME=${unline_path}
else
PREHOME=${HOME}"/unline"
fi
sys_version=$(lsb_release -a 2>/dev/null | grep 'Description' | awk -F '[:]+' '{print $2}' | sed 's/[^0-9.]//g')
if [[ "$sys_version" =~ ^22\..*$ ]]
then
  echo y | sudo apt install gcc-12
fi
DIR=$( dirname "$(readlink -f  ${BASH_SOURCE[0]})" )
#当前脚本上一层路径
PARENTPATH=$(dirname $(dirname ${DIR}))
SOURCEFILE=`sh ${PARENTPATH}/getunlinefile.sh ${PREHOME} vmware`
sudo sh ${PREHOME}/vmware/${SOURCEFILE}
cd ${PREHOME}/vmware/vmware-host-modules
make && sudo make install
echo "ZF3R0-FHED2-M80TY-8QYGC-NPKYF"
# https://www.cnblogs.com/wthuskyblog/p/16349940.html
